package com.example.supplychainbackend.mapper;

import com.example.supplychainbackend.controller.dto.trace.TraceInfoDto;
import com.example.supplychainbackend.entity.trace.TraceInfoEntity;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;

import java.util.List;

@Mapper(componentModel = "spring",
        builder = @Builder(disableBuilder = true),
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface TraceMapper {
    TraceInfoEntity toTraceInfoEntity(TraceInfoDto traceInfoDto);

    TraceInfoDto toTraceInfoDto(TraceInfoEntity traceInfoEntity);
    List<TraceInfoDto> toTraceInfoDtoList(List<TraceInfoEntity> traceInfoEntities);
}
